<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="loginmysql.*, java.util.*"%>
<%@page import="loginmysql.*, java.util.*,java.sql.SQLException"%>
<%
	MysqlLogin.connect();

	String name = request.getParameter("nam");
	int state = Integer.parseInt(request.getParameter("state"));
	System.out.println(name + state);
	try {
		MysqlLogin.insert("UPDATE categoria SET activo =" + state
				+ " WHERE info='" + name + "'");
		out.print("Ok!");
	} catch (SQLException e) {
		out.print("Hubo en error");
	}

	MysqlLogin.disconnect();
%>